// 获取素材商品列表
export const listGalleryMall = (params) => {
    return $fetchList(`/cc/gallery/mall/list`, {
      method: "GET",
      query: {
        ...params,
      },
    });
  };

// 获取租户素材商品列表
export const listTenantGallery = (params) => {
  return $fetchList(`/cc/gallery/mall/tenant`, {
    method: "GET",
    query: {
      ...params,
    },
  });
};

// 获取素材商品收藏列表
export const listCollectGallery = (params) => {
  return $fetchList(`/cc/gallery/mall/collect`, {
    method: "GET",
    query: {
      ...params,
    },
  });
};


// 获取素材商品详情
export const getGalleryMall = (mallId) => {
  return $api(`/cc/gallery/mall/${mallId}`, {
    method: "GET",
  });
};

export const galleryShelf = (params) => {
  return $api(`/cc/gallery/mall/shelf`, {
    method: "PUT",
    body: {
      ...params,
    },
  });
};

export const galleryUnshelf = (params) => {
  return $api(`/cc/gallery/mall/unshelf`, {
    method: "PUT",
    body: {
      ...params,
    },
  });
};




export const collectGallery = (params) => {
  return $api(`/cc/gallery/collect`, {
    method: "POST",
    body: {
      ...params,
    },
  });
};

export const cancelCollectGallery = (params) => {
  return $api(`/cc/gallery/collect`, {
    method: "DELETE",
    body: {
      ...params,
    },
  });
};